package org.nerve.webmagic.downloader;

import com.machinepublishers.jbrowserdriver.JBrowserDriver;
import org.nerve.webmagic.DriverBuilder;
import org.nerve.webmagic.JBrowserDriverBuilder;
import org.nerve.webmagic.bean.SpiderConfig;
import org.openqa.selenium.OutputType;

/**
 * org.nerve.webmagic.downloader
 * Created by zengxm on 2016/4/21 0021.
 */
public class JBrowserDriverDownloader extends AbstractRemoteDriverDownloader<JBrowserDriver> {

	public JBrowserDriverDownloader(final SpiderConfig config) {
		super(config);
	}

	@Override
	protected String takeScreenShot(JBrowserDriver driver) {
//		return super.takeScreenShot(driver);

		driver.getScreenshotAs(OutputType.BASE64);
		return null;
	}

	@Override
	protected DriverBuilder<JBrowserDriver> getDriverBuilder() {
		return new JBrowserDriverBuilder();
	}
}
